import 'package:flutter/material.dart';

class TagWidget extends StatelessWidget {
  Color fontColor = Colors.white;

  String text = "";

  GestureTapCallback? onTap = null;

  Color background = Color(0xFFFEB79C);

  TagWidget(
    this.text, {
    this.fontColor = Colors.white,
    this.onTap = null,
    this.background = const Color(0xFFFEB79C),
  });

  @override
  Widget build(BuildContext context) {
    return GestureDetector(
      child: Container(
        margin: EdgeInsets.only(
          left: 5,
          right: 5,
        ),
        decoration: BoxDecoration(
          borderRadius: BorderRadius.circular(5),
          color: this.background,
        ),
        padding: EdgeInsets.only(
          top: 3,
          bottom: 3,
          left: 10,
          right: 10,
        ),
        child: Text(
          this.text,
          style: TextStyle(
            color: fontColor,
          ),
        ),
      ),
      onTap: onTap,
    );
  }
}
